/*
 * @Description: Stay hungry,Stay foolish
 * @Author: Huccct
 * @Date: 2023-05-19 17:15:57
 * @LastEditors: Huccct
 * @LastEditTime: 2023-05-23 21:32:57
 */
// 统一管理用户相关接口
import request from '@/utils/request'

import type {
  LoginFormData,
  LoginResponseData,
  userInfoResponseData,
} from './type'

// enum API {
//   LOGIN_URL = '/admin/acl/index/login',
//   USERINFO_URL = '/admin/acl/index/info',
//   LOGOUT_URL = '/admin/acl/index/logout',
// }

export const reqLogin = (data: LoginFormData) =>
  request.post<any, LoginResponseData>('/user/login', data)
export const reqUserInfo = (userid: string) =>
  request.post<any, userInfoResponseData>('/user/UserInfo', { userid })

export const reqLogOut = (userid: string) => request.post<any, any>('/user/logout',{ userid })
